﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Collections.ObjectModel;

namespace SLWebApp
{
    public partial class MainPage : UserControl
    {
        private MonthSchedule theMonthSchedule = null;//月度计划
        private ShipSchedule theShipSchedule = null;//船期
        private FlightsVessels theFlightsVessels = null;//航班船

        private FlightInfo theFlightInfo = null; //航班
        string userid = string.Empty;//当前登陆用户名.
        string pageid = string.Empty;//判断当前应该显示哪个页面。
        public MainPage()
        {
            InitializeComponent();

            System.Windows.Browser.HtmlDocument doc = System.Windows.Browser.HtmlPage.Document;
            if (doc.QueryString.Count > 0)
            {
                userid = doc.QueryString["userid"].ToString();
                pageid = doc.QueryString["pagename"].ToString();
            }
            switch (pageid)
            {
                case "113":
                    {
                        theShipSchedule = new ShipSchedule();
                        borderContainer.Child = null;
                        borderContainer.Child = theShipSchedule;
                    } break;//船期
                case "137":
                    {
                        theMonthSchedule = new MonthSchedule();
                        borderContainer.Child = null;
                        borderContainer.Child = theMonthSchedule;
                    } break;//月度计划
                case "117":
                    {
                        theFlightInfo = new FlightInfo();
                        borderContainer.Child = null;
                        borderContainer.Child = theFlightInfo;
                    };break;//航班船
                case "":
                        {
                        };break;
                default:
                    break;
            }
        }
    }//end class
}
